<template>
  <el-color-picker v-model="value" v-bind="$attrs" />
</template>

<script setup lang="ts">
import { computed } from 'vue'

const props = defineProps({
  modelValue: String
})

const emits = defineEmits({
  'update:modelValue': (data) => !!data
})

const value = computed({
  get: () => {
    return props.modelValue as string
  },
  set: (value: string) => {
    emits('update:modelValue', value)
  }
})

defineOptions({
  name: 'ColorPicker'
})
</script>

<style scoped></style>
